package cn.xiaohui;

public class Market {
	private String marketName;
	private Prouduct[] productArr;
	public String getMarketName() {
		return marketName;
	}
	public void setMarketName(String marketName) {
		this.marketName=marketName;
	}
	public Prouduct[] getProductArr() {
		return productArr;
	}
	public void setProductArr(Prouduct[] productArr) {
		this.productArr=productArr;
	}
	Prouduct sell(String name) {
		for(int i=0; i<productArr.length; i++) {
			if(productArr[i].getProName() ==name) {
				return productArr[i];
			}
		}
		return null;
	}
	}
	


